gdkkeys-win32: Fix handling of SGCAPS
authorPhilip Zander <philip.zander@gmail.com>
Wed, 12 Jan 2022 20:36:41 +0000 (21:36 +0100)
committerLuca Bacci <luca.bacci982@gmail.com>
Wed, 12 Jan 2022 20:44:24 +0000 (21:44 +0100)
commitdb0234ecb44121bdce11398ea8a6f26b29849c46
tree0e96b15c8dcc059eea788e30999cd898da62a13b
parent438fad803e4d97c1ef4b6507b3f08913ae0e0c17
gdkkeys-win32: Fix handling of SGCAPS

Contrary to what you can read on the internet, SGCAPS keys don't work
by having capslock toggle the KBDCTRL bit, they actually have two
consecutive table entries, the first of which is for the normal
version and the second of which is for the capslocked version.

Background: SGCAPS is short for Swiss German caps because Swiss German
was the first layout to use this feature. For keys with the SGCAPS flag,
capslock has a different effect than pressing shift. For example:
Shift + ü = è,  CapsLock + ü = Ü,  CapsLock + Shift + ü = È
gdk/win32/gdkkeys-win32-impl.c
gdk/win32/gdkkeys-win32.c
gdk/win32/gdkprivate-win32.h